package com.java.teachercode.mycode;

/**
 * @author shkstart
 * @create 2021-01-28 15:21
 */
public class Producter extends Thread {
    private Breadbag bc;
    private int buProduct;

    public Producter(Breadbag bc, String name, int buProduct) {
        super(name);
        this.bc = bc;
        this.buProduct = buProduct;
    }

    @Override
    public void run() {
        bc.buyproduct(buProduct, getName());
    }
}
